// /////////////////////////////////////////////////////////////////////////////
//
// Name:            processors.cpp
// Author:          Michael Bartsch (ZCCdark203)
//
// Desc :           Implements global functions regarding AssetProcessors.
//
// License:         Copyright (C) 2009 Michael Bartsch and Contributors
//
//                  This program is free software: you can redistribute it
//                  and/or modify it under the terms of the zlib/libpng License.
//                  See main.cpp for conditions of distribution and use.
//
// /////////////////////////////////////////////////////////////////////////////

// Include files
#include "processors.h"
#include "../core/GameManager.h"

// Registers all available AssetProcessor factories.
void registerProcessorFactories()
{
    // Get pointer to the AssetManager.
    AssetManager *pAssetMgr = GameManager::Instance()->getAssetManager();

    // Register factories.
    pAssetMgr->registerProcessorFactory("heightmaps", HeightmapProcessor::createProcessor);
    pAssetMgr->registerProcessorFactory("meshes", MeshProcessor::createProcessor);
    pAssetMgr->registerProcessorFactory("textures", TextureProcessor::createProcessor);

#ifdef __COMPILE_WITH_ANGELSCRIPT__
    pAssetMgr->registerProcessorFactory("scripts", ScriptProcessor::createProcessor);
#endif // __COMPILE_WITH_ANGELSCRIPT__

#ifdef __COMPILE_WITH_SFML_AUDIO__
    pAssetMgr->registerProcessorFactory("sounds", SoundProcessor::createProcessor);
#endif // __COMPILE_WITH_SFML_AUDIO__

    pAssetMgr->registerProcessorFactory("entities", EntityProcessor::createProcessor);
}

// End of File
